package cn.tedu.charging.order.feign;

import cn.tedu.charging.common.pojo.param.GunStatusUpdateParam;
import cn.tedu.charging.common.pojo.vo.StationInfoVO;
import cn.tedu.charging.common.web.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("deviceService")
public interface DeviceClient {
//    目的:通过OpenFeign调用nacos注册中心的服务
    @GetMapping("/device/station/info/{gunId}")
    JsonResult<StationInfoVO> createStation(@PathVariable("gunId") Integer gunId);

    /*
        RestFul 风格代码
        两种方式: (动作/资源) (资源/动作)
     */
    @PostMapping("/device/station/gun/status/update")
    JsonResult<Boolean> updateGunStatusParam(@RequestBody GunStatusUpdateParam gunStatusUpdateParam);

}
